using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Features
{
    /// <summary>
    /// <para>Feature Envelope To Polygon</para>
    /// <para>Creates a feature class containing polygons, each of which represents the envelope of an input feature.</para>
    /// <para>创建包含面的要素类，每个面表示输入要素的包络。</para>
    /// </summary>    
    [DisplayName("Feature Envelope To Polygon")]
    public class FeatureEnvelopeToPolygon : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public FeatureEnvelopeToPolygon()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input features that can be multipoint, line, polygon, or annotation.</para>
        /// <para>输入要素可以是多点、线、面或注记。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output polygon feature class.</para>
        /// <para>输出面要素类。</para>
        /// </param>
        public FeatureEnvelopeToPolygon(object _in_features, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Feature Envelope To Polygon";

        public override string CallName => "management.FeatureEnvelopeToPolygon";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "extent", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _single_envelope.GetGPValue()];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input features that can be multipoint, line, polygon, or annotation.</para>
        /// <para>输入要素可以是多点、线、面或注记。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output polygon feature class.</para>
        /// <para>输出面要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Create multipart features</para>
        /// <para><xdoc>
        ///   <para>Specifies whether to use one envelope for each entire multipart feature or one envelope per part of a multipart feature. This parameter will affect the results of multipart input features only.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Uses one envelope containing an entire multipart feature; therefore, the resulting polygon will be singlepart. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Uses one envelope for each part of a multipart feature; the resulting polygon of the multipart feature will remain multipart.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是对每个整个多部分要素使用一个包络，还是对多部分要素的每个部分使用一个包络。此参数将仅影响分段输入要素的结果。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 （Unchecked） - 使用一个包含整个多部分特征的信封;因此，生成的多边形将是单部分的。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 （Checked） - 对多部分要素的每个部分使用一个包络;生成的多部分要素面将保持多部分。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Create multipart features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _single_envelope_value _single_envelope { get; set; } = _single_envelope_value._false;

        public enum _single_envelope_value
        {
            /// <summary>
            /// <para>MULTIPART</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MULTIPART")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>SINGLEPART</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SINGLEPART")]
            [GPEnumValue("false")]
            _false,

        }

        public FeatureEnvelopeToPolygon SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, object extent = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, extent: extent, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}